var btn = document.getElementsByTagName("button")[1];
btn.onclick = function (){
    var re = window.confirm('您确定要支付吗?');
    if(re){
        location.href = "http://127.0.0.1:5500/js%E7%BB%83%E4%B9%A0/%E5%80%92%E6%95%B0%E8%AE%A1%E6%97%B6%E5%92%8C%E7%AB%8B%E5%8D%B3%E8%BF%94%E5%9B%9E/lx2.html";
    }
}




























//alert("hhhh");
//console.log("好了");
//document.write("测试成功");
//var num = 100;
//console.log(typeof num);
/*var sum=0;
for(var i = 1; i<= 9; i++){
    document.write("<br/>");
    for(var j = 1; j <= i; j++){
        sum = i * j;
        document.write(i + "*" + j + "=" + sum+ " ");
    }
}*/
/*

学习的时候敲的内容，有点舍不得删，先放着吧

var arr = ["a","b","c"];
var myArr = arr.join();//为空的话默认是逗号连接;
console.log("myArr:" + myArr);
console.log("split后的myArr:" + myArr.split(""));//为空的话默认分割每一个字符

//任意范围内的随机数的生成
var randomnum;
function getrandomnum(min,max){
    return Math.random()*(max-min)+min;
}
randomnum = getrandomnum(5,10);
console.log(randomnum);

//终于开始搞document啦！！！
 var div1 = document.getElementsByTagName("div")[1]
 console.log(div1);

var newp = document.createElement("p");
var content = document.createTextNode("新建了一个p标签");
var id0 = document.createAttribute("id");
id0.value = "p1";
newp.appendChild(content);
newp.setAttributeNode(id0);
console.log(newp);
var div1 =document.getElementById("div1");
div1.appendChild(newp);*/